package archer.framework.ebean.mock;

import com.avaje.ebean.annotation.WhenCreated;

import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import java.sql.Timestamp;
import java.util.List;

/**
 * @author christ
 * @date 2016/4/8
 */
@Entity
public class UserMock {

    @Id
    String id;

    String name;

    String remark;

    @WhenCreated
    Timestamp createTime;

    @OneToMany(mappedBy = "user")
    List<AddressMock> addresses;

    public String getId() {
        return id;
    }

    public UserMock setId(String id) {
        this.id = id;
        return this;
    }

    public String getName() {
        return name;
    }

    public UserMock setName(String name) {
        this.name = name;
        return this;
    }

    public String getRemark() {
        return remark;
    }

    public UserMock setRemark(String remark) {
        this.remark = remark;
        return this;
    }

    public Timestamp getCreateTime() {
        return createTime;
    }

    public UserMock setCreateTime(Timestamp createTime) {
        this.createTime = createTime;
        return this;
    }

    public List<AddressMock> getAddresses() {
        return addresses;
    }

    public UserMock setAddresses(List<AddressMock> addresses) {
        this.addresses = addresses;
        return this;
    }
}
